LISTS, PART 2: Now that the list is sorted, we can easily get the highest and lowest scores by using indexes.

Access list items by using an index value. The first index is always at [0] and the last index is always at [-1].

  • Use Get Value at Index so that it stores the first index of score_list in a variable named highest.
  • Use Get Value at Index again so that it stores the last index of score_list in a variable named lowest.

NOTE: The variable rank has a default value to avoid an error. You'll give it a new value in the next activity!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)